package cn.tonyandmoney.baidu.consumers

import io.reactivex.functions.Consumer

abstract class RxAbstractConsumer<T> : Consumer<T> {

    override fun accept(t: T) {
        try {
            onEvent(t)
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    abstract fun onEvent(t: T)
}